class Solution {
public:
    vector<string> uncommonFromSentences(string s1, string s2) {
        unordered_map<string,int> up;
        string s=s1+" "+s2;
        int start=0,pos=s.find(' ');
        while(pos!=string::npos)
        {
            string tmp=s.substr(start,pos-start);
            up[tmp]++;
            start=pos+1;
            pos=s.find(' ',start);
        }
        string tmp=s.substr(start,pos-start);
        up[tmp]++;

        vector<string> v;
        for(auto& e:up)
        {
            if(e.second==1)
            {
                v.push_back(e.first);
            }
        }
        return v;
    }
};
